home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / ib.790 < prev    next >
Text File  |  1992-02-06  |  1KB  |  25 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fswiss Helvetica;}
  2. \paperw12940
  3. \paperh9000
  4. \margl120
  5. \margr1000
  6. {\colortbl\red0\green0\blue0;}
  7. \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\f0\b0\i0\ul0\fs28\fc0 InterfaceBuilder default window memory leak
  8. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600 \
  9. \
  10. Q:  I am writing a simple editor program, which loads in a nib file for each document created.  I noticed with MallocDebug that there is a consistent leak of  22 bytes for every newly created document window, even though the documentation says that the default window is to be freed when closed.  Why is it leaking?\
  11. \
  12. A:  The default window created with InterfaceBuilder is somewhat different from the default window created with the methods 
  13. \b alloc 
  14. \b0 and 
  15. \b initContent:style:backing:buttonMask
  16. \b0 .  The InterfaceBuilder default window is not automatically freed when closed.  To fix this problem, simply check the "Free when closed" option in the Window Attributes Panel, using the IB Projects Inspector.\
  17.  
  18. \fc0 \
  19. QA790\
  20. \
  21. Valid for 1.0\
  22. Valid for 2.0\
  23. \
  24.  
  25.